//
//  BaseTabBarButton.m
//  Learn
//
//  Created by icomexe on 2018/10/27.
//  Copyright © 2018年 cjg. All rights reserved.
//

#import "BaseTabBarButton.h"

@implementation BaseTabBarButton

- (void)layoutSubviews
{    [super layoutSubviews];
    
    CGRect imageRect = self.imageView.frame;
    CGRect titleRect = self.titleLabel.frame;
    imageRect.size = self.imageSize;
    titleRect.size = CGSizeMake(60, 15);
    imageRect.origin.x = (self.frame.size.width - imageRect.size.width)/2.0f;
    imageRect.origin.y = 5;
    titleRect.origin.x = 0;
    titleRect.origin.y = imageRect.origin.y + imageRect.size.height +5;
    self.imageView.frame = imageRect;
    self.titleLabel.frame = titleRect;
    self.titleLabel.font = Font(12);
    self.titleLabel.textAlignment = 1;

}

@end
